using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace Pbdms.NetworkDealer.EventArgs
{
    /// <summary>
    /// define an event argument passed when a SearchResultReceived event is triggered
    /// </summary>
    public class SearchResultReceivedEventArgs : System.EventArgs 
    {
        private readonly ArrayList arlOfItems;
        private readonly System.Net.IPAddress ipAdd;
        private readonly int inResponseOfRequestId;
        
        /// <summary>
        /// ip of the sender
        /// </summary>
        public System.Net.IPAddress IpAdd
        {
            get { return ipAdd; }
        } 

        /// <summary>
        /// array list of the result
        /// </summary>
        public ArrayList ArlOfResultItems
        {
            get { return arlOfItems; }
        }
        /// <summary>
        /// the identity of the search request
        /// </summary>
        public int InResponseOfRequestId
        {
            get { return inResponseOfRequestId; }
        }        
        
        /// <summary>
        /// create an instance
        /// </summary>
        /// <param name="ipAddResponder"></param>
        /// <param name="inResponseOfSearchId"></param>
        /// <param name="arlOfResultItems"></param>
        public SearchResultReceivedEventArgs(System.Net.IPAddress ipAddResponder, int inResponseOfRequestId, ArrayList arlOfResultItems)
        {
            this.ipAdd = ipAddResponder;            
            this.inResponseOfRequestId = inResponseOfRequestId;
            this.arlOfItems = arlOfResultItems;
            
            
        }

    }
}
